package gui;

import client.ConnectionStatus;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

public class SyncFinishedGuiUpdater implements Runnable {

	private MainFrame mf;

	public SyncFinishedGuiUpdater( MainFrame mf ) {
		this.mf = mf;
	}

	public void run() {
		mf.setSyncInProgress( (Boolean) false );
		mf.updateGuiAccordingToConnStatus( ConnectionStatus.AUTHORIZED );

		JPanel resultPanel = new SyncResultPanel( MainFrame.getClientController().getSyncLog() );
		JOptionPane.showMessageDialog( null, resultPanel );
	}
	
}
